// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** getTeamUserVo 获取我的团队信息 GET /api/team */
export async function getTeamUserVoByUserIdUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListTeamUserVo_>('/api/team', {
    method: 'GET',
    ...(options || {})
  })
}

/** deleteTeam 删除团队 DELETE /api/team */
export async function deleteTeamUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteTeamUsingDELETEParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team', {
    method: 'DELETE',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** acceptInvite 接受邀请 POST /api/team/accept-invite */
export async function acceptInviteUsingPost(
  body: API.AcceptInviteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/accept-invite', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** addTeam 新增团队 POST /api/team/add */
export async function addTeamUsingPost(body: API.AddTeamRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean_>('/api/team/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** application 更新团队信息 GET /api/team/application */
export async function applicationUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.applicationUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/application', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** auditApplication 审核请求 POST /api/team/auditApplication */
export async function auditApplicationUsingPost(
  body: API.TeamAuditRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/auditApplication', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** generateInvite 邀请用户加入团队,短链邀请 GET /api/team/generate-invite */
export async function generateInviteUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.generateInviteUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/team/generate-invite', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** inviteUser 邀请用户加入团队,直接邀请 POST /api/team/invite */
export async function inviteUserUsingPost(
  body: API.TeamInviteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/invite', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** kickOut 踢出团队成员 POST /api/team/kick-out */
export async function kickOutUsingPost(
  body: API.TeamKickOutRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/kick-out', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** listTeamUserHistory 获取团队成员变动记录 POST /api/team/listTeamUserHistory */
export async function listTeamUserHistoryUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listTeamUserHistoryUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageTeamUserHistoryVo_>('/api/team/listTeamUserHistory', {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** pageUserInTeam 获取团队成员列表 POST /api/team/page */
export async function pageUserInTeamUsingPost(
  body: API.UserInTeamRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageUserInTeamVo_>('/api/team/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** resolveInvite 解析短链邀请 GET /api/team/resolve-invite */
export async function resolveInviteUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.resolveInviteUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseString_>('/api/team/resolve-invite', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** updateTeam 更新团队信息 PUT /api/team/update */
export async function updateTeamUsingPut(
  body: API.TeamUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/team/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
